using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using Fuse8.DomainFramework.Domain;

namespace Fuse8.DomainFramework.DataAccess.SqlDatabase
{
    /// <summary>
    /// 
    /// </summary>
    public interface ISqlSchemaBuilderChain : ISqlSchemaBuilder
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="builder"></param>
        void Add(ISqlSchemaBuilder builder);
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sqlSchemaBuilder"></param>
        void AddDefault(ISqlSchemaBuilder sqlSchemaBuilder);
    }

    /// <summary>
    /// 
    /// </summary>
    public abstract class DefaultSqlSchemeBuilderForSuccessor : ISqlSchemaBuilder
    {
        /// <summary>
        /// Get columns list for entity
        /// </summary>
        /// <param name="connection">Current connection</param>
        /// <typeparam name="T">Entity type</typeparam>
        /// <returns>List of columns for entity</returns>
        public virtual IList<SqlColumn> GetColumns<T>(SqlConnection connection)
        {
            return null;
        }

        /// <summary>
        /// Get columns list for entity
        /// </summary>
        /// <param name="type">Entity type</param>
        /// <param name="connection">Current connection</param>
        /// <returns>List of columns for entity</returns>
        public virtual IList<SqlColumn> GetColumns(Type type, SqlConnection connection)
        {
            return null;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="connection"></param>
        /// <param name="transaction"> </param>
        /// <param name="sp"></param>
        /// <returns></returns>
        public virtual IList<SqlProcedureParameter> GetStoredProcedureParameters(SqlConnection connection, SqlTransaction transaction, string sp)
        {
            return null;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        public virtual IList<Type> GetUpdateParts<T>()
        {
            return null;
        }
    }
}